package com.zcm.provider.controller;

import com.zcm.provider.dao.Goods;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wxhntmy
 */
@RestController
@RequestMapping("/goods")
public class GoodsController {

    @GetMapping("/findOne/{id}")
    public Goods findOne(@PathVariable("id") int id) {
        Goods goods = new Goods();
        goods.setId(1);
        goods.setTitle("华为手机");
        goods.setPrice(10000);
        goods.setCount(10000);
        return goods;
    }
}
